import request from '@/utils/request'

// 查询颜色资料列表
export function listInformation(query) {
  return request({
    url: '/base/information/list',
    method: 'get',
    params: query
  })
}

// 查询颜色资料详细
export function getInformation(colorId) {
  return request({
    url: '/base/information/' + colorId,
    method: 'get'
  })
}

// 新增颜色资料
export function addInformation(data) {
  return request({
    url: '/base/information',
    method: 'post',
    data: data
  })
}

// 修改颜色资料
export function updateInformation(data) {
  return request({
    url: '/base/information',
    method: 'put',
    data: data
  })
}

// 删除颜色资料
export function delInformation(colorId) {
  return request({
    url: '/base/information/' + colorId,
    method: 'delete'
  })
}

// 导出颜色资料
export function exportInformation(query) {
  return request({
    url: '/base/information/export',
    method: 'get',
    params: query
  })
}
//修改状态
export function changeInfFlag(colorId,colorFlag){

  const data = {
    colorId,
    colorFlag
  }
  return request({
    url: '/base/information/changeInfFlag',
    method: 'put',
    data: data
  })
}
